"""bookmanager URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/1.11/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  url(r'^$', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  url(r'^$', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.conf.urls import url, include
    2. Add a URL to urlpatterns:  url(r'^blog/', include('blog.urls'))
"""
from django.conf.urls import url, include
from django.contrib import admin
"""
1 urlpatterns 是固定写法，是个列表，里面的元素是 url
2 浏览器中的路径会和urlpatterns中的每一项顺序匹配
    如果匹配成功，直接引导到相应的模块
    不成功（把urlpatterns中的每一个都匹配过），返回404
3 http://ip:port/path/?key=value中，
    只有path会被拿出来进行和urlpatterns中的url进行正则匹配
4 如果和当前的某一项匹配成功，则引到子应用中继续匹配
    如 index/info  index在一次匹配中已经使用了，
    引到index的子应用匹配时，只需要匹配info/

"""

urlpatterns = [
    url(r'^admin/', admin.site.urls),
    url(r'^', include('book.urls')),
    url(r'^pay/', include('pay.urls')),



]
